<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@include file="/common/jsp/taglibs-nojs-nocss.jsp"%>
<%
	String path_part = request.getContextPath();
	String basePathter = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path_part + "/";
%>
<div class="wbs_scroll" style="height:23px;">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="gridview">
	<thead>
		<tr class="title">
			<td width="4%"  align="center" >序号</td>
			<td width="15%" align="center" >合同名称</td>
			<td width="15%" align="center" >产品名称</td>
			<td width="10%" align="center" >产品单位</td>
			<!-- 
			<td width="10%" align="center" >产品类型</td>
			 -->
			<td width="10%" align="center" >产品数量</td>
			<td width="10%" align="center">产品单价</td>
			<td width="10%" align="center" >产品总价</td>
			<td width="10%" align="center">备注</td>
			<td class="nowrap">
				操作
			</td>
		</tr>
	</thead>
</table>
</div>
<div class="wbs_scroll" style="height:396px;" >
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="gridview" id="sale_saleChance_table">
	<tbody class="mytbody">
		<s:if test="wrapperList!=null && wrapperList.size()>0">
			<s:iterator id="wrapperList" value="wrapperList" status="status">
				<tr <s:if test="#status.odd"> class="odd_title" </s:if><s:else>class="even_title "</s:else>>
					<td width="4%"><s:property value="#status.count"/></td>
					<td width="15%" title="${contractName}">${contractName}</td>
					<td width="15%">${productName}</td>
					<td width="10%">${productUnit}</td>
					<!-- 
					<td width="10%">${productType}</td>
					 -->
					<td width="10%">${countNum}</td>
					<td width="10%">${unitPrice}</td>
					<td width="10%">${totalprice}</td>
					<td width="10%">${mark}</td>
					<td class="nowrap">
						<a class="icon_tools menu_arrow_down" href="javascript:void(0);" onClick="openmenu(this , 'contractProductDetailAction!gotoContractProductDetailMenu.action?id=${id}');">▼</a>
			        </td>
				</tr>
			</s:iterator>
		</s:if>
		<s:else>
			<tr>
				<td align="center" colspan="10">
					无记录
				</td>
			</tr>
		</s:else>
	</tbody>
</table>
<%@include file="../../common/jsp/pageing.jsp" %>
</div>
<script>
	// 文本超过8个字符数时，用省略显示
		text_overflow( 10 );
	 	//查询方法
		function searchContractProductDetailBySearchKey(){
			var name = document.getElementById("condition.productName").value;
			var type = document.getElementById("condition.productType").value;
			loadContent('_econTargetList_div_id','contractProductDetailAction!findAllContractProductDetail.action?condition.productName='+name+'&condition.productType='+type , function(){
			setGridCss();
			})
		}
        // 分页
		function gotoPage( pageNo , totalPage , pageSize ){
			// 按page的信息加载数据
			// 如果当前页大于了最大页数就弹出警告
			if( pageNo > totalPage ){
				window.alert( '总页数为'+totalPage+' , 请重新输入页码!' );
				return;
			}
			// 加载数据
			loadContent( '_econTargetList_div_id' , 'contractProductDetailAction!listContractProductDetailByPage.action?page.pageNo='+pageNo+'&page.totalPage='+totalPage+'&page.pageSize='+pageSize+'&condition.productName=<s:property value="condition.productName"/>&condition.productType=<s:property value="condition.productType"/>',function() {setGridCss();setGridOddEvenCss();} );
		}
</script>